package cn.itenzo.common.vo;

import java.io.Serializable;

public class RetMsg implements Serializable{

    private static final long serialVersionUID = 9090780375427371469L;
    private String code;

    private String message;

    private Object data;



    public static RetMsg success(String message, Object data){
        RetMsg retMsg = new RetMsg();
        retMsg.setCode("00");
        retMsg.setMessage(message);
        retMsg.setData(data);
        return retMsg;
    }

    public static RetMsg error(String message){
        RetMsg retMsg = new RetMsg();
        retMsg.setCode("99");
        retMsg.setMessage(message);
        return retMsg;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}